<div>
    <el-form ref="editForm" :model="form" label-width="100px" label-position="left">

        <el-form-item label="商品标签" prop="labelIdLst">
            <el-select placeholder="请选择..." v-model="form.labelIdLst" multiple style="width:100%">
                <el-option v-for="item in labelOptions" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
            </el-select>
        </el-form-item>
        <el-form-item label="商品品牌" prop="brandId">
            <el-select placeholder="请选择..." v-model="form.brandId" style="width:100%">
                <el-option v-for="item in brandOptions" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
            </el-select>
        </el-form-item>
        <el-form-item label="初始销量" prop="initSales" :rules="[{trigger: ['blur', 'change'] ,validator: validateNum}]">
            <el-input v-model.number="form.initSales" show-word-limit></el-input>
        </el-form-item>
        <el-form-item label="库存计算方式" prop="stockType">
            <el-radio-group v-model="form.stockType" >
                <!-- <el-radio :label="item.dictValue" v-for="(item,index) in dict_goods_sku" :key="item.id">
                    {{item.dictLabel}}</el-radio> -->
                <el-radio :label="1">下单减库存</el-radio>
                <el-radio :label="2">支付减库存</el-radio>
                <el-radio :label="3">永不减库存</el-radio>
            </el-radio-group>
        </el-form-item>

        <el-form-item label="显示库存" prop="isShowStock">
            <el-radio-group v-model="form.isShowStock" >
                <el-radio :label="0">否</el-radio>
                <el-radio :label="1">是</el-radio>
            </el-radio-group>
        </el-form-item>

        <el-form-item label="显示销量" prop="isShowSales">
            <el-radio-group v-model="form.isShowSales">
                <el-radio :label="0">否</el-radio>
                <el-radio :label="1">是</el-radio>
            </el-radio-group>
        </el-form-item>


        <el-form-item label="上架状态" prop="publishStatus" v-if="goodsAuth != 1">
            <el-radio-group v-model="form.publishStatus" @change="form.publishAuto=0;form.publishTimeStr='';">
                <el-radio :label="0">上架</el-radio>
                <el-radio :label="1">下架</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item prop="publishAuto" v-if="goodsAuth != 1">
            <el-checkbox v-model="form.publishAuto" :true-label="1" :false-label="0" @change="form.publishTimeStr='';">
                {{form.publishStatus=='0'?'启用定时下架':'启用定时上架'}}</el-checkbox>
            <el-date-picker style="margin-left:10px" v-model="form.publishTimeStr" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
                v-if="form.publishAuto==1" :placeholder="'请选择'+(form.publishStatus=='0'?'定时下架':'定时上架')+'时间'">
            </el-date-picker>

        </el-form-item>
    </el-form>
</div>